package com.bis.ymyy.service.impl;

import com.bis.ymyy.entity.Employee;
import com.bis.ymyy.mapper.EmployeeMapper;
import com.bis.ymyy.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;
    @Override
    public List<Employee> getAllEmployee() {
        return employeeMapper.getAllEmployee();
    }

    @Override
    public int addOneEmployee(Employee employee) {
        return employeeMapper.addOneEmployee(employee);
    }

    @Override
    public int modifyEmployee(Employee employee) {
        return employeeMapper.modifyEmployee(employee);
    }

    @Override
    public int deleteEmployee(int id) {
        return employeeMapper.deleteEmployee(id);
    }

    @Override
    public Employee findById(int id) {
        return employeeMapper.findById(id);
    }
}
